<?php
/**
 * Copyright (c) 2010 Sebastian Bechtel <me@sebastian-bechtel.info>
 * All rights reserved.
 *
 * @package
 * @author Sebastian Bechtel <me@sebastian-bechtel.info>
 * @copyright Sebastian Bechtel <me@sebastian-bechtel.info>. All rights reserved.
 * @license BSD License
 * @since 2010
 */
// setup include path
// and init and register Auto_Loader
set_include_path('.:./../includes:../library/zend-fw');

require_once "Zend/Loader/Autoloader.php";

$loader = Zend_Loader_Autoloader::getInstance()->registerNamespace('Taply');
spl_autoload_register(array($loader, 'autoload'));

// init front controller
$fctrl = Zend_Controller_Front::getInstance()
                ->setControllerDirectory('../zfw-taply/controllers');

// setup routing
$fctrl->getRouter()->addConfig(new Zend_Config_Ini('../conf/routes.ini', 'routes'), 'taply');

$req = new Zend_Controller_Request_Http();
$res = new Zend_Controller_Response_Http();

// Dispatch
$fctrl->dispatch($req, $res);